package com.starlinkdt.common.domain.system.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starlinkdt.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serial;

/**
 * OAI 请求任务批处理实体类
 */
@Data
@TableName("task_dispatch")
@ApiModel(value = "TaskDispatch", description = "任务调度")
public class TaskDispatch extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(name = "id")
    private Long id;

    /**
     * 业务类型: BusinessTypeEnum
     */
    @ApiModelProperty(name = "业务类型: BusinessTypeEnum")
    private String businessType;

    /**
     * 业务唯一标识
     */
    @ApiModelProperty(name = "业务唯一标识")
    private String businessId;

    /**
     * 任务类型: TaskTypeEnum
     */
    @ApiModelProperty(name = "任务类型: TaskTypeEnum")
    private int taskType;

    /**
     * 请求JSON内容
     */
    @ApiModelProperty(name = "请求JSON内容")
    private String requestJson;

    /**
     * 状态: TaskStatusEnum
     */
    @ApiModelProperty(name = "状态: TaskStatusEnum")
    private int status;

    /**
     * 当前重试次数
     */
    @ApiModelProperty(name = "当前重试次数")
    private int retryCount;

    /**
     * 最大重试次数
     */
    @ApiModelProperty(name = "最大重试次数")
    private int maxRetry;

    /**
     * 响应返回信息
     */
    @ApiModelProperty(name = "响应返回信息")
    private String responseJson;

    /**
     * 版本号（乐观锁）
     */
    @ApiModelProperty(name = "版本号（乐观锁）")
    private int version;

}
